﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace zeus.Web
{
    /// <summary>
    /// Descripción breve de Upload
    /// </summary>
    public class Upload : IHttpHandler
    {


        public void ProcessRequest(HttpContext context)
        {

            HttpPostedFile file = context.Request.Files["Filedata"];

            int id = (Int32.Parse(context.Request["id"]));
            string foo = context.Request["foo"];
            //file.SaveAs("C:\\Fotos\\" + id.ToString() + foo + file.FileName);
           file.SaveAs("C:\\zeus\\app\\zeus.Web\\Fotos\\" + id.ToString() + foo + file.FileName);
            context.Response.Write("1");
        }
        
        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}